<template>
  <div id="login_container">
    <p>微信用户信息如下：</p>
    <img :src="user.avatar" alt="" />
    <p>{{user.name}}</p>
  </div>
</template>

<script>
  import {
    getUrlParmas
  } from '../../utils/util'
  export default {
    name: "qqcos",
    data() {
      return {
        imageUrl: '',
        uid:'75624809',
        arrlist:[],
        appid: 'wxf3fb1b693eb24074',
        user:{avatar: '',name: ''}
      };
    },
    mounted() {
      this.getWexinUserInfo()
    },
    methods: {
      getWexinUserInfo(){
        let ack = getUrlParmas("ack");
        console.log(1111111);
        console.log(ack)
        this.getRequest('https://mpapi.app.cctv.com/vapi/wxpo/userack.do?ack=' + ack, {}, {}).then(res => {
          if (res.code === 200) {
            console.log(res)
            this.user.avatar = res.data.headImgurl
            this.user.name = res.data.nickName
            // this.$cookies.set("uid",this.uid);
            // this.$cookies.set("openid",res.data.openid);
            // this.$cookies.set("avatar",res.data.headImgurl);
          } else {
            console.log(2222222)
          }
        })
      }

    },

  }
</script>

<style scoped>

</style>